public class Card {
	
	int color, front;
	
	public Card(){
		color = 4;
		front = 13;
	}
	
	public Card(int color, int front) throws CardException{
		if (color > 3 || front > 12) throw new CardException("There's not such a card in deck");
		this.color = color;
		this.front = front;
	}

	/**
	 * Return color of card
	 * @return color of card
	 */
	public int getColor() {
		return color;
	}

	/**
	 * Return figure of card
	 * @return figure of card
	 */
	public int getFigure() {
		return front;
	}
	
	/**
	 * @return string representation of card
	 */
	public String toString(){
		// Figury rosnaco
		String[] Colors = {"spades", "hearts", "diamond", "clubs"};
		String[] Fronts = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"};
		
		String card = Fronts[front] + " of " + Colors[color];
		
		return card;
	}
}
